Previous: Doc Comments, Up: Font Locking [Contents][Index]
The general appearance of font-locking in AWK mode is much like in any other programming mode. See Faces for Font Lock in GNU Emacs Lisp Reference Manual.
The following faces are, however, used in a non-standard fashion in AWK mode:
font-lock-variable-name-faceThis face was intended for variable declarations. Since
variables are not declared in AWK, this face is used instead
for AWK system variables (such as NF) and
“Special File Names” (such as
"/dev/stderr").
font-lock-builtin-face
(Emacs)/font-lock-preprocessor-face (XEmacs)This face is normally used for preprocessor directives in
CC Mode. There are no such things in AWK, so this face is
used instead for standard functions (such as
match).
font-lock-string-faceAs well as being used for strings, including localizable strings, (delimited by ‘"’ and ‘_"’), this face is also used for AWK regular expressions (delimited by ‘/’).
font-lock-warning-face
(Emacs)/c-invalid-face (XEmacs)This face highlights the following syntactically invalid AWK constructs:
font-lock-warning-face. This is most
noticeable when typing in a new string/regular expression
into a buffer, when the warning-face serves as a continual
reminder to terminate the construct.
AWK mode fontifies unterminated strings/regular expressions differently from other modes: Only the text up to the end of the line is fontified as a string (escaped newlines being handled correctly), rather than the text up to the next string quote.
Previous: Doc Comments, Up: Font Locking [Contents][Index]